package cn.yunhe.services.impl;

import cn.yunhe.dao.IScoreDao;
import cn.yunhe.dao.IStudentCollDao;
import cn.yunhe.dao.LIStudentDao;
import cn.yunhe.entity.Course;
import cn.yunhe.entity.Problem;
import cn.yunhe.entity.Score;
import cn.yunhe.services.LIStudentServices;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class LStudentServices implements LIStudentServices {




    @Resource
    private LIStudentDao lStudentDao;


    @Resource
    private IStudentCollDao studentCollDao;

    @Resource
    private IScoreDao scoreDao;

    /**
     * 获取  课程 list集合
     *
     * @return
     */
    @Override
    public List<Course> getCourseList() {
        return lStudentDao.getAllCourse();
    }


    /**
     * 根据 course_id找到  该课程下的所有知识点下的 　所有 题目 1
     * * @return
     */
    @Override
    public List<Problem> findProblemsByCourseId(int course_id) {
        return lStudentDao.findProblemsByCourseId(course_id);
    }


    /**
     * 查找历史 id
     * @param score_id  分数id
     * @return
     */
    @Override
    public Score findHistoryPaperById(int score_id) {
        return scoreDao.findHistoryPaper(score_id);
    }

}
